package com.example.fangqidian;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

/**
 * 创建日期:2019/1/17 on 13:45
 * 描述：
 * 作者: zhougan
 */
public abstract class BaseActivity extends AppCompatActivity {
    protected static final String TAG = "BaseActivity>>>>";


    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
        initView();
        initData();
        bindData();
    }

    abstract void initView();
    abstract void initData();
    abstract void bindData();


    protected void showToast(String msg){
        Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
    }
    protected void showToastLong(String msg){
        Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
    }

}
